// 模拟数据，用于开发和测试

// 用户数据
export const mockUsers = [
  {
    id: 1,
    username: 'admin',
    email: 'admin@example.com',
    phone: '13800138000',
    avatar: 'https://via.placeholder.com/100',
    role: 'admin',
    status: 'active',
    createdAt: '2024-01-01T00:00:00Z'
  },
  {
    id: 2,
    username: 'student1',
    email: 'student1@example.com',
    phone: '13800138001',
    avatar: 'https://via.placeholder.com/100',
    role: 'user',
    status: 'active',
    createdAt: '2024-01-02T00:00:00Z'
  }
]

// 商品分类数据
export const mockCategories = [
  { id: 1, name: '数码产品', icon: 'i-ep-mobile' },
  { id: 2, name: '图书文具', icon: 'i-ep-document' },
  { id: 3, name: '服饰鞋包', icon: 'i-ep-clothes' },
  { id: 4, name: '运动健身', icon: 'i-ep-football' },
  { id: 5, name: '家居用品', icon: 'i-ep-home' },
  { id: 6, name: '其他商品', icon: 'i-ep-more' }
]

// 商品数据
export const mockProducts = [
  {
    id: 1,
    title: '全新未拆封AirPods Pro 2',
    description: '全新未拆封的AirPods Pro 2代，支持主动降噪，续航持久。',
    price: 1599,
    originalPrice: 1899,
    images: ['https://via.placeholder.com/400x300'],
    categoryId: 1,
    categoryName: '数码产品',
    status: 'approved',
    sales: 12,
    views: 156,
    createdAt: '2024-01-10T00:00:00Z',
    userId: 2,
    username: 'student1'
  },
  {
    id: 2,
    title: 'Python编程从入门到精通',
    description: '九成新Python编程书籍，内容全面，适合初学者。',
    price: 39,
    originalPrice: 89,
    images: ['https://via.placeholder.com/400x300'],
    categoryId: 2,
    categoryName: '图书文具',
    status: 'approved',
    sales: 8,
    views: 98,
    createdAt: '2024-01-11T00:00:00Z',
    userId: 2,
    username: 'student1'
  },
  {
    id: 3,
    title: '耐克运动鞋',
    description: '耐克运动鞋，尺码42，穿过两次，几乎全新。',
    price: 299,
    originalPrice: 899,
    images: ['https://via.placeholder.com/400x300'],
    categoryId: 3,
    categoryName: '服饰鞋包',
    status: 'approved',
    sales: 5,
    views: 76,
    createdAt: '2024-01-12T00:00:00Z',
    userId: 2,
    username: 'student1'
  }
]

// 订单数据
export const mockOrders = [
  {
    id: 'ORD20240115001',
    userId: 2,
    username: 'student1',
    totalAmount: 1599,
    status: 'completed',
    paymentMethod: 'alipay',
    items: [
      {
        productId: 1,
        productTitle: '全新未拆封AirPods Pro 2',
        price: 1599,
        quantity: 1,
        image: 'https://via.placeholder.com/100x100'
      }
    ],
    address: {
      name: '张三',
      phone: '13800138001',
      province: '北京市',
      city: '北京市',
      district: '海淀区',
      detail: '某某大学宿舍1号楼101室'
    },
    createdAt: '2024-01-15T10:30:00Z',
    updatedAt: '2024-01-17T15:20:00Z'
  }
]

// 统计数据
export const mockStats = {
  totalUsers: 125,
  totalProducts: 342,
  totalOrders: 89,
  totalSales: 23590,
  todayNewUsers: 5,
  todayNewProducts: 12,
  todayNewOrders: 3,
  todaySales: 899
}

// 模拟登录响应
export const mockLoginResponse = {
  code: 200,
  message: '登录成功',
  data: {
    token: 'mock-token-123456',
    userInfo: mockUsers[0]
  }
}

// 模拟注册响应
export const mockRegisterResponse = {
  code: 200,
  message: '注册成功'
}

// 模拟商品列表响应
export const mockProductListResponse = {
  code: 200,
  message: '获取成功',
  data: {
    list: mockProducts,
    total: mockProducts.length,
    page: 1,
    pageSize: 10
  }
}

// 模拟订单列表响应
export const mockOrderListResponse = {
  code: 200,
  message: '获取成功',
  data: {
    list: mockOrders,
    total: mockOrders.length,
    page: 1,
    pageSize: 10
  }
}

// 模拟统计数据响应
export const mockStatsResponse = {
  code: 200,
  message: '获取成功',
  data: mockStats
}